package com.briup.cms.web.controller;

import com.briup.cms.config.response.Result;
import com.briup.cms.domain.bean.Slideshow;
import com.briup.cms.service.SlideshowService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 25095
 * @description
 * @data 2024/12/12-14:52
 */
@Tag(name = "测试模块")
@RestController
@RequiredArgsConstructor
@RequestMapping("test")
public class TestController {
    private final SlideshowService slideshowService;


    @Operation(summary = "测试查询所有的轮播图")
    @GetMapping
    public Result<?> test() {
        List<Slideshow> list = slideshowService.list();
        return Result.success(list)
                .apply("获取成功");
    }
}
